]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: when a file changes, remove it from the image cache
authorOwen W. Taylor <otaylor@fishsoup.net>
Wed, 24 Sep 2014 20:40:00 +0000 (16:40 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Thu, 25 Sep 2014 03:06:07 +0000 (23:06 -0400)
MetaBackgroundCache doesn't itself use file watches, so when a image
that we are monitoring changes we need to purge it from the cache,
so that when we load it again we get the new image.

https://bugzilla.gnome.org/show_bug.cgi?id=710756

js/ui/background.js

index 9ca9312ec4d83c53470146ed422e4a3b6dd6e180..781f20240a5a33be29e549859c1b9919ae64ebd5 100644 (file)
@@ -300,6 +300,8 @@ const Background = new Lang.Class({
         let signalId = this._cache.connect('file-changed',
                                            Lang.bind(this, function(cache, changedFile) {
                                                if (changedFile == filename) {
+                                                   let imageCache = Meta.BackgroundImageCache.get_default();
+                                                   imageCache.purge(changedFile);
                                                    this.emit('changed');
                                                }
                                            }));